package com.heu.zth;
import java.util.HashMap;

public class Car implements Comparable<Car> {
	final static double INFCOST = Double.MAX_VALUE;

	private int id;
	private HashMap<Car, Double> neighbors;
	
	private double currentCost = INFCOST;
	
	public Car parent;

	public Car(int id, HashMap<Car, Double> neighbors) {
		this.id = id;
		this.neighbors = neighbors;
	}

	public Car(int id) {
		this.id = id;
	}

	public double getCurrentCost() {
		return currentCost;
	}

	public void setCurrentCost(double currentCost) {
		this.currentCost = currentCost;
	}

	public int getId() {
		return id;
	}

	public HashMap<Car, Double> getNeighbors() {
		return neighbors;
	}

	public void setNeighbors(HashMap<Car, Double> neighbors) {
		this.neighbors = neighbors;
	}

	public void setId(int id) {
		this.id = id;
	}

	public boolean isEqual(Car other) {
		if (this.id == other.id) {
			return true;
		}

		return false;
	}

	@Override
	public int compareTo(Car other) {
		return Double.compare(this.getCurrentCost(), other.getCurrentCost());
	}
	
}
